# -*- sh -*-
k() { pkill -$1 wm; }

restart() { k HUP; }
next() { k RTMIN; }
prev() { k RTMIN+1; }
zoom() { k RTMIN+2; }
grow() { k RTMIN+3; }
shrink() { k RTMIN+4; }
kill() { k RTMIN+5; }
float() { k RTMIN+6; }
mode() { k RTMIN+7; }

view() { k RTMIN+$((8+${1:-0})); }
tag() { k RTMIN+$((18+$((${1:?'usage: wmc tag [1-9]'}-1)))); }
toggletag() { k RTMIN+$((27+$((${1:?'usage: wmc toggletag [1-9]'}-1)))); }
toggleview() { k RTMIN+$((36+$((${1:?'usage: wmc toggleview [1-9]'}-1)))); }

$@